package com.chinabank.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "t_assignment")
public class Assignment {
	private Long id;
	
	//需要指派的需求申请
	private DemandReport demandReport;
	//审批流当前指派的审批人列表
	private List<Account> screeners;
	//当前审批级
	private Integer level;
	//添加时间
	private Date addDate;
	
	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@ManyToMany
	public List<Account> getScreeners() {
		return screeners;
	}

	public void setScreeners(List<Account> screeners) {
		this.screeners = screeners;
	}
	@ManyToOne
	public DemandReport getDemandReport() {
		return demandReport;
	}
	
	public void setDemandReport(DemandReport demandReport) {
		this.demandReport = demandReport;
	}

	public Integer getLevel() {
		return level;
	}


	public void setLevel(Integer level) {
		this.level = level;
	}

	public Date getAddDate() {
		return addDate;
	}

	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}

}
